From 3bba21e14b98a2d57d22230a8fd41549cc1b7dec Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Tue, 18 Feb 2025 17:59:09 +0100 Subject: [PATCH] Check if folder exists before deleting sync db and VFS sync root connection. Fix for #7860. Signed-off-by: Camila Ayres --- src/gui/folder.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 0d7166acb..85e004995 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -1020,15 +1020,20 @@ void Folder::slotTerminateSync() void Folder::wipeForRemoval() { - // Delete files that have been partially downloaded. - slotDiscardDownloadProgress(); - disconnectFolderWatcher(); // Unregister the socket API so it does not keep the .sync_journal file open FolderMan::instance()->socketApi()->slotUnregisterPath(alias()); _journal.close(); // close the sync journal + if (!QDir(path()).exists()) { + qCCritical(lcFolder) << "db files are not going to be deleted, sync folder could not be found at" << path(); + return; + } + + // Delete files that have been partially downloaded. + slotDiscardDownloadProgress(); + // Remove db and temporaries QString stateDbFile = _engine->journal()->databaseFilePath(); -- 2.30.2